package Junit.domain;

import java.util.Vector;

import junit.framework.TestCase;
import domain.items.*;

public class ForumThreadTest extends TestCase {
	ForumThread forumThread = new ForumThread(null);
	
	public void testPostes(){
		Vector<Post> tPosts = new Vector<Post>();
		Post tPost1 = new Post(null,"O1","S1","C1");
		tPosts.add(tPost1);
		Post tPost2 = new Post(null,"O2","S2","C2");
		tPosts.add(tPost2);
		Post tPost3 = new Post(null,"O3","S3","C3");
		tPosts.add(tPost3);
		forumThread.setPosts(tPosts);
		assertEquals(3, forumThread.getPosts().size());
		assertEquals(tPost1.getOwner(), forumThread.getPosts().elementAt(0).getOwner());
		assertEquals(tPost3.getText(), forumThread.getPosts().elementAt(2).getText());
		
	}

}
